import Vue from 'vue'
import vueRouter from 'vue-router'

// 组件名
import Test from '../components/test.vue'
// 
import ShopList from '../components/shopList.vue'

import Parent from '../components/parent/index.vue'
import Shop from '../components/shop/index.vue'
import Hello from '../components/HelloWorld.vue'
import Table from '../components/table.vue'
import Crud from '../components/crud.vue'
import Formdemo1 from '../components/formdemo1.vue'
import Login from '../components/login.vue'
import Main from '../components/main.vue'

Vue.use(vueRouter)

const router = new vueRouter({
    routes: [
        {
            path: '/test',
            name: 'test',
            component: Test
        },
        {
            path: '/table',
            name: 'table',
            component: Table
        },
        {
            path: '/hello',
            name: 'hello',
            component: Hello
        },
        {
            path: '/shopList',
            name: 'shopList',
            component: ShopList
        },
        {
            path: '/parent',
            name: 'parent',
            component: Parent
        },
        {
            path: '/shop',
            name: 'shop',
            component: Shop
        },
        {
            path: '/crud',
            name: 'crud',
            component: Crud
        },
        {
            path: '/formdemo1',
            name: 'formdemo1',
            component: Formdemo1
        },
        {
            path: '/login',
            name: 'login',
            component: Login
        },
        {
            path: '/main',
            name: 'main',
            component: Main
        },
    ]
})

export default router